package com.kaishengit.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.kaishengit.dao.DealNoteDao;
import com.kaishengit.pojo.Deal;
import com.kaishengit.pojo.DealNote;

@Transactional
public class DealNoteService {
	private DealNoteDao dealNoteDao;
	
	
	
	
	//get set
	
	public DealNoteDao getDealNoteDao() {
		return dealNoteDao;
	}

	public void setDealNoteDao(DealNoteDao dealNoteDao) {
		this.dealNoteDao = dealNoteDao;
	}

	public void save(DealNote dealnote) {
           dealNoteDao.save(dealnote);
	}

	public List<DealNote> findAll(Deal deal) {
	String hql="select h from DealNote as h where h.deal.id=?";
	return dealNoteDao.find(hql, deal.getId());
	}

	public void dels_talk(String id) {
		dealNoteDao.Del(id);
		
	}
	
	
	
	
}
